/*
 * 广州丰石科技有限公司拥有本软件版权2021并保留所有权利。
 * Copyright 2021, Guangzhou Rich Stone Data Technologies Company Limited,
 * All rights reserved.
 */

package demo;

/**
 * <b><code>UserTypeEnum</code></b>
 * <p/>
 * 用户类型枚举类
 * <p/>
 * <b>Creation Time:</b> 2021/4/20 下午7:24.
 *
 * @author TangZibo
 * @since rziomp-be v1.0.0
 */
public enum UserTypeEnum {//TODO:用户角色配置枚举
    ENTERPRISE("1", "企业用户"),

    QXYYJCK("2", "区县运行监测科"),
    QXGHYJSGZK("3", "区县规划与技术改造科"),
    SJQYK("4", "市级企业科"),
    SJYXJCK("5", "市级运行监测科"),
    SJGHYJSGZK("6", "市级规划与技术改造科"),
    RZSLD("7", "日照市领导"),
    XTGLY("8", "系统管理员"),

    SJ("9","审计管理员"),
    AQ("10", "安全管理员");

    private String typeCode;

    private String typeDescription;

    UserTypeEnum(String typeCode, String typeDescription) {
        this.typeCode = typeCode;
        this.typeDescription = typeDescription;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public String getTypeDescription() {
        return typeDescription;
    }

    public static String  getDesc(String code) {
        UserTypeEnum[] userTypeEnums = UserTypeEnum.values();
        for (UserTypeEnum us : userTypeEnums) {
            if (code.equals(us.typeCode)) {
                return us.typeDescription;
            }
        }
        return "";
    }
}
